﻿using Net6Shell.DataModel;
using SqlSugar;
using System;
using System.Data;

namespace Net6Shell.IRepository
{
    public interface IBaseRepository<TEntity> where TEntity : class, new ()
    {
        public int Insert(TEntity entity);

        public int Delete(TEntity entity);

        public int Update(TEntity entity);

        public TEntity GetById(string id);

        public DataTable GetDataTable(string sql);

        public int ExecuteCommand(string sql);

        public List<TEntity> GetListByWhere(Expressionable<TEntity> express);
    }
}
